/*  请求地址:http://wthrcdn.etouch.cn/weather_mini
  请求方法:get
  请求参数:city(城市名)
  响应内容:天气信息
  */
  var app = new Vue({
    el:"#app",
    data:{
        city:"郑州",
        weatherlist:[],
        hotlist:["北京","上海","广州","深圳"],
    },
    methods:{
        searchCity:function(){
            var that = this;
            axios.get("http://wthrcdn.etouch.cn/weather_mini?city="+this.city).then(function(response){
                that.weatherlist = response.data.data.forecast;
            }).catch(function(err){})
        },
        search:function(city){
            this.city=city;
            // console.log(this.city);
            this.searchCity();
        }
    }
})